//导入路由
import VueRouter from 'vue-router'

//导入路由组件
import Home from './components/tabbar/Home.vue'
import Record from './components/tabbar/record.vue'
import Knowledge from './components/tabbar/knowledge.vue'
import Mine from './components/tabbar/mine.vue'
import Login from './components/login/login.vue'
import Register from './components/register/register.vue'
import Pregnancy from './components/register/pregnancy.vue'
import Gestation from './components/register/gestation.vue'
import Parenting from './components/register/parenting.vue'
import Server from './components/register/server.vue'
import Steward from './components/steward/steward.vue'
import StewardDetail from './components/steward/steward-detail.vue'
import doctorDynamic from './components/doctor-dynamic/doctorDynamic.vue'
import doctorDynamicDetail from './components/doctor-dynamic/doctorDynamic-detail.vue'
import Comment from './components/comments/comment.vue'
import Answers from './components/answers/answers.vue'
import Weight from './components/weight/weight.vue'
import Photoinfo from './components/weight/photoinfo/photoinfo.vue'
import Shopinfo from './components/shopInfo/shopinfo.vue'
import Pictureinfo from './components/shopInfo/pictureInfo/pictureinfo.vue'
import GoodComments from './components/shopInfo/goodsComments/goodsComments.vue'
//配置路由
var router = new VueRouter({
    routes: [{
            path: '/home',
            component: Home
        },
        {
            path: '/record',
            component: Record
        },
        {
            path: '/knowledge',
            component: Knowledge
        },
        {
            path: '/mine',
            component: Mine
        },
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/login',
            component: Login
        },
        {
            path: '/register',
            component: Register
        },
        {
            path: '/register/pregnancy',
            component: Pregnancy
        }, //备孕
        {
            path: '/register/gestation',
            component: Gestation
        }, //孕期
        {
            path: '/register/parenting',
            component: Parenting
        }, //育儿期
        {
            path: '/register/server',
            component: Server
        }, //定制服务
        {
            path: '/steward',
            component: Steward
        }, //管家推荐
        {
            path: '/steward/steward-detail/:id',
            component: StewardDetail
        },
        {
            path: '/home/doctorDynamic',
            component: doctorDynamic
        },
        {
            path: '/home/doctorDynamic/doctorDynamic-detail/:id',
            component: doctorDynamicDetail
        },
        {
            path: '/doctorDynamic-detail/comment',
            component: Comment
        },
        {
            path: '/home/answers',
            component: Answers
        },
        {
            path: '/record/weight',
            component: Weight
        },
        {
            path: '/record/weight/photoinfo/:id',
            component: Photoinfo
        },
        {
            path: '/record/shopinfo',
            component: Shopinfo
        },
        {
            path: '/record/shopinfo/pictureinfo',
            component: Pictureinfo
        },
        {
            path: '/record/shopinfo/goodComments',
            component: GoodComments
        }

    ],
    linkActiveClass: 'mui-active' //覆盖默认的路由高亮的类
})

//将路由信息导出
export default router;